#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
void* my_memmove(void* dest, const void* src, size_t num)
{
	assert(dest && src);
	char* str = dest;
	if (dest > src)
	{
		while (num--)
		{
			*((char*)dest + num) = *((char*)src + num);
		}
	}
	else
	{
		while (num--)
		{
			*(char*)dest = *(char*)src;
			dest = (char*)dest + 1;
			src = (char*)src + 1;
		}
	}
	return str;
}


int main()
{
	int str1[] = { 1,2,3,4,5,6,7 };
	my_memmove(str1, str1 + 1, 12);
	for(int i = 0; i < 7; i++)
	{
		printf("%d ", str1[i]);
	}


	return 0;
}